package com.mactivity.activities;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
 
@SuppressWarnings("deprecation")
public class FriendListTabActivity extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.friend_list);
        TabHost tabHost = getTabHost();
        // Tab for Add Friend
        TabSpec spec = tabHost.newTabSpec("Add Friend");
        // setting Title and Icon for the Tab
        spec.setIndicator("Add Friend", getResources().getDrawable(R.drawable.tab));
        Intent intent = new Intent(this, AddFriendActivity.class);
        spec.setContent(intent);
        // Tab for Delete Friend
        TabSpec delete_spec = tabHost.newTabSpec("Friend List");
        delete_spec.setIndicator("Friend List", getResources().getDrawable(R.drawable.tab));
        Intent delete_friend_Intent = new Intent(this, DeleteFriendActivity.class);
        delete_spec.setContent(delete_friend_Intent);
        // Adding all TabSpec to TabHost
        tabHost.addTab(delete_spec); // Adding Delete Friends tab
        tabHost.addTab(spec); // Adding Add Friends Tab tab
    }
}